<template>
  <div id="show">
    <div v-for="(obj,index) in listData" :key="index">
      <el-row>
        <el-col :span="24">
<!--          <div class="grid-content bg-purple-dark">-->
            <span style="margin-left: 10px">订单编号:{{obj.id}}</span>
            <span style="margin-left: 10px">电影名:{{obj.filmBean.name}}</span>
            <span style="margin-left: 10px">电影上映时间:{{obj.filmBean.time}}</span>
            <span style="margin-left: 10px">电影价格:{{obj.filmBean.money}}</span>
            <span style="margin-left: 10px">电影购买数量:{{obj.filmBean.number}}</span>
            <span style="margin-left: 10px">电影总价格:{{obj.filmBean.sumMoney}}</span>
<!--          </div>-->
        </el-col>
      </el-row>

    </div>
<!--    <input type="button" value="返回购买页面" style="margin-top: 50px" @click="ret()">-->
    <el-button type="primary" round style="margin-top: 50px" @click="ret()">返回购买页面</el-button>
  </div>
</template>

<script>
export default {
  name: "show",
  data() {
    return {
      listData:[]
    }
  },
  mounted() {
    console.log("初始化")
    this.show()
  },
  methods: {
    show: async function () {

      await this.$axios.get('tm/tianmao/findAll').then(
          r=>{
            this.listData=r.data;
          }
      )
      console.log(this.listData)
    },
    ret:async function(){
      location.href="/index"
    }
  }
}
</script>

<style scoped>

</style>